popover: Fix submenu navigation
authorMatthias Clasen <mclasen@redhat.com>
Tue, 17 Nov 2020 02:27:15 +0000 (21:27 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 17 Nov 2020 02:34:33 +0000 (21:34 -0500)
commitc2ae73f24769109e0af0553cc9e3321304a037d1
treebc000d0d21b72a1adde974cab75e8060b065512c
parent2c9bf55eea71f1de0ee9dc93f030a4fd78200cc8
popover: Fix submenu navigation

In commit 024d832d943b2abf4f0d, we introduced a
cascade-popdown property that makes closing a submenu
propagate up and close its parent menus. This is the
behavior we want when a menuitem in the submen is
activated.

What we overlooked is that we still need to be able to
close a submenu during navigation, before opening another
one. And in this case, propagating the closing is breaking
things. Fix this by adding a private close_submenu api
to GtkPopoverMenu that avoids the propagation.

Fixes: #3301
gtk/gtkmodelbutton.c
gtk/gtkpopovermenu.c
gtk/gtkpopovermenuprivate.h